MAP = '''\
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
H H HH H H         H                M
S   H              H SMSMS     S    S
H W H WWWH         H  D D H         E
S   H    H         HHSMDMS     M    H
H H    H H               W          M
HHHHHHHHHHDHHHHHHHHHHHHHHHHHHHHHHHHHH
W                                   E
SSSSSSSSSSSSSSSSSSSSSSSSSMSSSSSSSSSSM'''
DOOR_CODE = 5
openDOOR_CODE = -DOOR_CODE
BRICK_CODE = 1
SCIFI_CODE = 4
METAL_CODE = 3
WOOD_CODE = 2
END_CODE = 6